import React from 'react'
import { connect } from 'react-redux'
import { Button, Modal } from 'antd';

export const DelData = ({delIndex,deltitle,isModalOpen,dispatch,closeModel}:any) => {
     const showModal = () => {
        closeModel(true);
        };
      
        const handleOk = () => {
            closeModel(false);
          dispatch({type:'house/DEL_DATA',payload:delIndex})
        };
      
        const handleCancel = () => {
            closeModel(false);
        };
  return (
    <div>
         <Modal title="Basic Modal" open={isModalOpen} onOk={handleOk} onCancel={handleCancel}>
    <p>你确定删除{deltitle}</p>
      </Modal>
    </div>
  )
}

const mapStateToProps = (state:any) => ({})



export default connect(mapStateToProps)(DelData)